﻿using System;
using ExFlash.Records;

namespace ExFlash.Tags
{
    public class EnableDebugger2Tag : Tag
    {
        private readonly int _swfVersion;

        public StringRecord Password
        {
            get;
            private set;
        }

        public EnableDebugger2Tag(int len, int version, Int32 offset)
            : base(TagCodes.EnableDebugger2, len, offset)
        {
            _swfVersion = version;
        }

        public override void SwfDeserialize(BinaryBitReader reader)
        {
            // Reserved
            reader.Position += 2;

            Password = new StringRecord(_swfVersion);
            Password.SwfDeserialize(reader);
        }

        public override void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }
    }
}
